<template>
  <div class="wrap header">
    <div class="logo"><img src="@/assets/img/mail.png" alt="" /></div>
    <ul class="nav">
      <li :class="$route.path == '/home'?'active':''" @click="$router.push('/home')">首页</li>
      <li :class="$route.path == '/goods'?'active':''" @click="$router.push('/goods')">全部商品</li>
      <li :class="$route.path == '/user'?'active':''" @click="$router.push('/user')">个人中心</li>
      <li :class="$route.path == '/order'?'active':''" @click="$router.push('/order')">专属订单</li>
      <li :class="$route.path == '/free'?'active':''" @click="$router.push('/free')">个人福利</li>
    </ul>
    <div class="search">
      <input type="text" />
      <div class="searchIcon">
        <img src="@/assets/img/search.png" alt="">
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {

    }
  }
}
</script>

<style lang="less" scoped>
@import url('../assets/css/global.less');
.header {
  height: 118px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  .logo {
    width: 350px;
    img {
      width: 100%;
    }
  }

  .nav {
    display: flex;
    width: 500px;
    justify-content: space-between;
    li {
      cursor: pointer;
      &.active{
        color: @base-color;
        font-weight: bold;
      }
    }
  }

  .search {
    display: flex;
    input {
      width: 214px;
      height: 40px;
      border: 1px solid #dedede;
      border-radius: 20px 0 0 20px;
      text-indent: 14px;
    }
    .searchIcon {
      width: 50px;
      border-radius: 0 20px 20px 0;
      background: @base-color;
      display: flex;
      justify-content: center;
      align-items: center;
      img{
        width: 20px;
        height: 20px;
        cursor: pointer;
      }
    }
  }
}
</style>